package com.tledu.equipment.mapper;

import com.tledu.equipment.aspect.MyEquipmentLog;
import com.tledu.equipment.aspect.OperationType;
import com.tledu.equipment.domain.EquipmentInfo;
import com.tledu.equipment.domain.dto.TestResultDTO;

import java.util.List;

/**
 * 参试设备Mapper接口
 * 
 * @author ruoyi
 * @date 2024-08-29
 */
public interface EquipmentInfoMapper 
{
    /**
     * 查询参试设备
     * 
     * @param id 参试设备主键
     * @return 参试设备
     */
    public EquipmentInfo selectEquipmentInfoById(Long id);

    /**
     * 查询参试设备列表
     * 
     * @param equipmentInfo 参试设备
     * @return 参试设备集合
     */
    public List<EquipmentInfo> selectEquipmentInfoList(EquipmentInfo equipmentInfo);

    /**
     * 新增参试设备
     * 
     * @param equipmentInfo 参试设备
     * @return 结果
     */
    @MyEquipmentLog(OperationType.PUT_IN_FACTORY)
    public int insertEquipmentInfo(EquipmentInfo equipmentInfo);

    /**
     * 修改参试设备
     * 
     * @param equipmentInfo 参试设备
     * @return 结果
     */

    public int updateEquipmentInfo(EquipmentInfo equipmentInfo);

    /**
     * 删除参试设备
     * 
     * @param id 参试设备主键
     * @return 结果
     */
    public int deleteEquipmentInfoById(Long id);

    /**
     * 批量删除参试设备
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteEquipmentInfoByIds(Long[] ids);

    /**
     * 逻辑批量删除设备
     * @param ids
     * @return
     */
    @MyEquipmentLog(OperationType.GET_OUT_FACTOR)
    int logicDeleteEquipmentInfoByIds(Long[] ids);

//    int logicDeleteEquipmentInfoById(Long id);

    //申请试验
    int updateEquipmentStatus(Long id);

    //出库按钮逻辑
    @MyEquipmentLog(OperationType.GET_OUT_STORE)
    int updateUser_status(Long ids);

    //实验结果按钮逻辑
    int updateEquipmentStatus1(TestResultDTO testResultDTO);

    //入库按钮逻辑
    @MyEquipmentLog(OperationType.PUT_IN_STORE)
    int putInStore(Long id);
}
